home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1532.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  4.7 KB  |  177 lines

  1. 128
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. XCopy 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows and Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baXCopy copies multiple files from one folder to another folder, with wildcard 
  20. --- RECORDSEPARATOR ---
  21. matching, including sub-directories.
  22. --- RECORDSEPARATOR ---
  23.  
  24. --- RECORDSEPARATOR ---
  25. Usage:
  26. --- RECORDSEPARATOR ---
  27.  
  28. --- RECORDSEPARATOR ---
  29. Result = baXCopy( SourceDir, DestDir,  FileSpec, Overwrite, MakeDir )
  30. --- RECORDSEPARATOR ---
  31.  
  32. --- RECORDSEPARATOR ---
  33. Arguments:
  34. --- RECORDSEPARATOR ---
  35.  
  36. --- RECORDSEPARATOR ---
  37. String, string, string, string, integer. 
  38. --- RECORDSEPARATOR ---
  39. SourceDir is the folder to copy from. 
  40. --- RECORDSEPARATOR ---
  41. DestDir is the folder to copy to. 
  42. --- RECORDSEPARATOR ---
  43. FileSpec determines what files are copied. 
  44. --- RECORDSEPARATOR ---
  45. Overwrite determines how the copy is done. Can be: 
  46. --- RECORDSEPARATOR ---
  47. "Always" 
  48. --- RECORDSEPARATOR ---
  49. always copies the file 
  50. --- RECORDSEPARATOR ---
  51. "IfNewer" 
  52. --- RECORDSEPARATOR ---
  53. copies the file if SourceFile is newer than DestFile 
  54. --- RECORDSEPARATOR ---
  55. "IfNotExist" 
  56. --- RECORDSEPARATOR ---
  57. copies only if DestFile does not already exist 
  58. --- RECORDSEPARATOR ---
  59. If MakeDir is true, any empty directories will be created.
  60. --- RECORDSEPARATOR ---
  61.  
  62. --- RECORDSEPARATOR ---
  63. Returns:
  64. --- RECORDSEPARATOR ---
  65.  
  66. --- RECORDSEPARATOR ---
  67. Integer. 
  68. --- RECORDSEPARATOR ---
  69. Returns 0 if all the files were copied successfully, otherwise one of these: 
  70. --- RECORDSEPARATOR ---
  71. --- RECORDSEPARATOR ---
  72. Invalid SourceDir name 
  73. --- RECORDSEPARATOR ---
  74. --- RECORDSEPARATOR ---
  75. Invalid DestDir file name 
  76. --- RECORDSEPARATOR ---
  77. --- RECORDSEPARATOR ---
  78. Error reading a Source file 
  79. --- RECORDSEPARATOR ---
  80. --- RECORDSEPARATOR ---
  81. Error writing a Dest file 
  82. --- RECORDSEPARATOR ---
  83. --- RECORDSEPARATOR ---
  84. Couldn't create directory for Dest files 
  85. --- RECORDSEPARATOR ---
  86. --- RECORDSEPARATOR ---
  87. Dest file exists 
  88. --- RECORDSEPARATOR ---
  89. --- RECORDSEPARATOR ---
  90. Dest file is newer that Source file 
  91. --- RECORDSEPARATOR ---
  92. --- RECORDSEPARATOR ---
  93. No files matched the specified wildcard
  94. --- RECORDSEPARATOR ---
  95.  
  96. --- RECORDSEPARATOR ---
  97. Examples:
  98. --- RECORDSEPARATOR ---
  99.  
  100. --- RECORDSEPARATOR ---
  101. Director: 
  102. --- RECORDSEPARATOR ---
  103. set OK = baXCopy( "c:\data" , "d:\backup" , "*.dat" , "IfNewer" , true ) 
  104. --- RECORDSEPARATOR ---
  105. set OK = baXCopy( "Mac HD:data" , "Floppy:backup" , "TEXT" , "IfNewer" , true ) 
  106. --- RECORDSEPARATOR ---
  107. Authorware: 
  108. --- RECORDSEPARATOR ---
  109. OK := baXCopy( "c:\\data" , "d:\\backup" , "*.*" , "Always" , f
  110. --- RECORDSEPARATOR ---
  111. alse )
  112. --- RECORDSEPARATOR ---
  113.  
  114. --- RECORDSEPARATOR ---
  115. Notes:
  116. --- RECORDSEPARATOR ---
  117.  
  118. --- RECORDSEPARATOR ---
  119. By default, this function will not overwrite an existing file if that file is marked as 
  120. --- RECORDSEPARATOR ---
  121. read-only. However, by adding "+"  to the "Always" and "IfNewer" options (eg 
  122. --- RECORDSEPARATOR ---
  123. "Always+" or "IfNewer+"), the files will be overwritten if they are read-only. 
  124. --- RECORDSEPARATOR ---
  125. The return value will not be 0 if any file is not copied. For example, if you specify 
  126. --- RECORDSEPARATOR ---
  127. baXCopy( "c:\data" , "d:\backup" , "*.*" , "IfNewer" ) and any of the files in c:\data 
  128. --- RECORDSEPARATOR ---
  129. are newer than the ones in d:\backup, the return result will be 7 (Dest file is newer 
  130. --- RECORDSEPARATOR ---
  131. than Source). A result of 0 will be returned only if none of the files in c:\data is 
  132. --- RECORDSEPARATOR ---
  133. newer than d:\backup. 
  134. --- RECORDSEPARATOR ---
  135. On
  136. --- RECORDSEPARATOR ---
  137.  Windows
  138. --- RECORDSEPARATOR ---
  139. , the FileSpec argument follows normal DOS wildcard rules. A * 
  140. --- RECORDSEPARATOR ---
  141. means match any character in the file name. So *.* copies all files; *.bmp copies all 
  142. --- RECORDSEPARATOR ---
  143. files with a .bmp extension; T*.* copies all files starting with the letter T. 
  144. --- RECORDSEPARATOR ---
  145. On
  146. --- RECORDSEPARATOR ---
  147.  Macintosh
  148. --- RECORDSEPARATOR ---
  149. , the wildcard is the four character type code, eg ΓÇ£TEXTΓÇ¥. Only one 
  150. --- RECORDSEPARATOR ---
  151. type can be specified. Use an empty string or ΓÇ£*.*ΓÇ¥ to specify all files. 
  152. --- RECORDSEPARATOR ---
  153. A return value of 6 (Dest file exists) can only be returned when Overwrite is 
  154. --- RECORDSEPARATOR ---
  155. "IfNotExist". A return value of 7 (Dest file is newer than Source file) can only be 
  156. --- RECORDSEPARATOR ---
  157. returned when Overwrite is "IfNewer". The other return values can be returned for 
  158. --- RECORDSEPARATOR ---
  159. all Overwrite options.
  160. --- RECORDSEPARATOR ---
  161.  
  162. --- RECORDSEPARATOR ---
  163. See also:
  164. --- RECORDSEPARATOR ---
  165.  
  166. --- RECORDSEPARATOR ---
  167. baCopyFile 
  168. --- RECORDSEPARATOR ---
  169. baCopyXFiles